#include "StackTests.h"
#include "../TestFramework/TestStack.h"

namespace
{
    TEST_CASE(TestStack)
    {
        TestFramework::TestStack<int> stack;

        for (int i = 1; i <= 10; ++i)
        {
            stack.Push(i);
        }

        for (int j = 10; j >= 1; --j)
        {
            CHECK(j == stack.Pop());
        }
    }


    START_TEST_SUITE(StackTest, "Stack test")
    {
        REGISTER_TEST(TestStack);
    }
    FINISH_TEST_SUITE
}

namespace Tests
{
    TestFramework::UnitTestPtr CreateStackTester()
    {
        CREATE_SUITE(StackTest);
    }
}
